home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat4 / ar.z / ar
Encoding:
Text File  |  2002-10-03  |  3.0 KB  |  76 lines

  1. .AR(4)                                               Last changed: 10-21-98
  2.  
  3.  
  4. NNAAMMEE
  5.      aarr - Archive (library) file format
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<aarr..hh>>
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      IRIX systems
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.      The archive command, aarr, combines several files into one.  Archives
  15.      are used mainly as libraries to be searched by the link-editor, lldd.
  16.  
  17.      A file produced by aarr has a magic string at the start, followed by the
  18.      constituent files, each preceded by a file header.  The magic number
  19.      and header layout as described in the include file are:
  20.  
  21.           #define ARMAG  "!<arch>0
  22.           #define SARMAG 8
  23.           #define ARFMAG "`0
  24.  
  25.           struct ar_hdr
  26.           {
  27.                char ar_name[16];
  28.                char ar_date[12];
  29.                char ar_uid[6];
  30.                char ar_gid[6];
  31.                char ar_mode[8];
  32.                char ar_size[10];
  33.                char ar_fmag[2];
  34.           };
  35.           typedef struct ar_hdr ARHDR;
  36.  
  37.      The name is terminated with a "/" character by default.  Any remaining
  38.      room in the name field is blank_filled.
  39.  
  40.      File name length is not limited.  For additional details, see the
  41.      _S_y_s_t_e_m _V _A_B_I _M_I_P_S _P_r_o_c_e_s_s_o_r _S_u_p_p_l_e_m_e_n_t and the aarr(1) man page.
  42.  
  43.      The _a_r__f_m_a_g field contains AARRFFMMAAGG to help verify the presence of a
  44.      header.  The other fields are left-adjusted, blank-padded numbers.
  45.      They are decimal except for _a_r__m_o_d_e, which is octal.  The date is the
  46.      modification date of the file at the time of its insertion into the
  47.      archive.
  48.  
  49.      Each file begins on an even (0 mod 2) boundary.  With compiler
  50.      releases 7.0 and lower, a new-line is inserted between files, if
  51.      necessary.  The size given reflects the actual size of the file
  52.      exclusive of padding.  With compiler releases 7.1 and higher, in order
  53.      to guarantee that each ELF format file is 16-byte aligned in the
  54.      archive, additional padding has been added to the end of each file
  55.      using the character '\0'.  This enables the loader (lldd) to have faster
  56.      access to members in the archive while performing static linking.
  57.      This results in the change of size of files permanently, normally
  58.      increased by 1 to 15 bytes.  With non-ELF files, this padding would
  59.      not occur.
  60.  
  61.      There is no provision for empty areas in an archive file.
  62.  
  63.      The encoding of the header is portable across machines.  If an archive
  64.      contains printable files, the archive itself is printable.
  65.  
  66. SSEEEE AALLSSOO
  67.      aarr(1), lldd(1), nnmm(1)
  68.  
  69.      _S_y_s_t_e_m _V _A_p_p_l_i_c_a_t_i_o_n _B_i_n_a_r_y _I_n_t_e_r_f_a_c_e, ISBN 0-13-877598-2, Prentice
  70.      Hall
  71.  
  72.      _S_y_s_t_e_m _V _A_B_I _M_I_P_S _P_r_o_c_e_s_s_o_r _S_u_p_p_l_e_m_e_n_t, ISBN 0-13-880170-3, Prentice
  73.      Hall
  74.  
  75.      This man page is available only online.
  76.